<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            height: 200px;
            width: 300px;
            margin: 20px auto 20px;
            display: block;
            background-color: pink;
            text-align: center;
            /*行内元素或者行内块元素水平居中给其父元素添加 text-align:center即可*/

        }
    </style>
</head>

<body>
    <div>
        <span>(内容)</span>
    </div>
    <div>
        <span>(内容)</span>
    </div>
    <div>
        <span><img src="img2/b.png" alt="sb"></span>
    </div>
</body>

</html>